import './style/style.scss';
import Dom from './utils/Dom';
import Gantt from './module/Gantt';
import Modal from './ui/Modal';

window.gantt = new Gantt('app');

// 屏蔽右键菜单
Dom.addEvent(document.body, 'contextmenu', e => {
   return Dom.nodefault(e);
});

window.alert = function (str) {
   new Modal('操作提示', '<p>' + str + '<p>', undefined, {
      type: 'alert'
   });
}

window.jsconfirm = function (str, callback) {
   new Modal('操作确认', '<p>' + str + '</p>', isOk => {
      callback(isOk);
      return true;
   }, {
         type: 'confirm'
      });
}